/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021-3-14
 * Time: 0:50
 */
layui.use(['jquery'], function () {
    var $ = jq = layui.jquery;
    if ($('.layui-form').length > 0) {
        $('.layui-form [lay-verify]').each(function () {
            var $this = $(this),
                verify = $this.attr('lay-verify');
            verify = verify.split('|');
            if ($.inArray("required", verify) != -1) {
                console.log($this.parents('.layui-form-item').find('.layui-form-label').find('.fa-check-square-o').length);
                if(!$this.parents('.layui-form-item').find('.layui-form-label').find('.fa-check-square-o').length){
                    $this.parents('.layui-form-item').find('.layui-form-label').prepend('<i class="fa fa-check-square-o font-red"></i>');
                }
            }
        });
    }
});
